package org.example.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import org.example.constant.ResponseCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class GlobalException extends RuntimeException{

    /**
     * 响应状态码
     */
    private ResponseCode responseCode;

    public GlobalException(ResponseCode responseCode, String message) {
        super(message);
        setResponseCode(responseCode);
    }
}
